filter_has_var
Check whether the variable of the specified type exists
filter_has_var() function checks whether there is a variable with the specified input type.
Return true if successful, otherwise return false.
In this example, the input variable "name" is sent to the PHP page:
<?php
if ( ! filter_has_var ( INPUT_GET , "name" ) )
{
echo ( "Input type does not exist" ) ;
}
else
{
echo ( "Input type exists" ) ;
}
?>
The output is similar:
Input type exists
filter_has_var ( type , variable )
| parameter | describe |
|---|---|
| type | Required. Specify the type to be inspected. Possible values:
|
| variable | Required. Specify the variables to be checked. |